from django.test import TestCase
import os

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'kaoshi.settings')
import django
django.setup()
# Create your tests here.
from app04.models import *
import uuid
# leave = Leave.objects.create(name='VIP用户')
# print(Leave.objects.all())


# user = User.objects.create(user_name='admin',password='123',leave=Leave.objects.get(pk='1'))


# print(User.objects.all().values())
user_list = Goods.objects.all()
user_data = []
for i in user_list:
    user_data.append({'id': i.pk, 'user_name': i.name})
print(user_data)
# fid = str(uuid.uuid4())
# Favourable.objects.create(fid=fid,name='满二元减十元')
# print(Favourable.objects.all())

# Goods.objects.create(name='物联网白皮书',price=10,counter=10)